Fix Windows build and runtime compatibility#75
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 73c647d1e3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| use std::sync::Arc; | ||
| use tokio::sync::RwLock; | ||
| use tracing::{debug, info, warn}; | ||
| use tracing::{debug, info}; |
There was a problem hiding this comment.
Re-add warn macro import for Unix build
Removing warn from the tracing import breaks Unix compilation because warn! is still invoked in graceful_shutdown under #[cfg(unix)]. On non-Windows targets this becomes an unresolved macro at compile time, so the crate no longer builds even though the Windows-specific changes compile.
Useful? React with 👍 / 👎.
| None | ||
| } | ||
| }) | ||
| .map(|stdout| stdout.contains(&format!(",\"{}\"", pid)) || stdout.contains(&format!(",{}", pid))) |
There was a problem hiding this comment.
Match PID column exactly in tasklist output
The fallback check stdout.contains(&format!(",{}", pid)) can produce false positives because tasklist CSV rows include other numeric fields (for example memory like "12,345 K"), so a stale PID such as 12 may be incorrectly reported as running. On Windows this can block daemon startup/cleanup and cause incorrect status reporting; parse the CSV PID field explicitly instead of substring matching.
Useful? React with 👍 / 👎.
- Edge payload: bare UUIDs (id, from, to)
- SQL: type::thing() constructs record refs internally
- UPSERT type::thing('edges', .id)
- from = type::thing('nodes', .from)
- to = type::thing('nodes', .to)
- Root cause: SurrealDB rejects param values as record refs in UPSERT;
type::thing() must be used inside SQL to construct them
- Also: CODEGRAPH_AUTO_MIGRATE env default, embedding dims (1536/3072),
node_to_surreal_map helper, indexer fixes
Closes graph traversal (from.name, to.name now resolve correctly)
Python frameworks: - Django: @app.route, @api_view, View/ViewSet/Model detection - Flask: @app.route, route handlers - FastAPI: @router, @get/@post/@put/@delete/@patch endpoints JS/TS frameworks: - Express: app.get, router.get, route handlers - NestJS: @controller, @get, @post, @module, @Injectable - Next.js: page routes, API routes, getServerProps - React: components (PascalCase), hooks (use*) Go frameworks: - Gin: gin.Context handlers - Echo: echo.Context handlers - Fiber: fiber.Ctx handlers - Chi: chi.Context handlers - Axum: extract:: patterns Rust frameworks: - Axum: #[axum_macros::debug_handler], extractors - Actix-web: #[actix_web::get/post/...], web::scope - Rocket: #[rocket::get/post/...], #[launch] - Poem: poem:: patterns All patterns add framework and pattern metadata to CodeNode.
C patterns: - struct/union/enum type_definition detection - #define macro extraction - Pure C file detection (.c extension, no classes) CUDA patterns: - .cu/.cuh file detection - __global__, __device__, __host__ kernel markers - __shared__, __constant__ memory spaces - cudaMalloc, cudaFree, cudaMemcpy detection - Kernel launch syntax (<<< >>>) - Framework metadata: cuda_kernel, memory_space, pattern All patterns add framework/language metadata to CodeNode.
- Add tree-sitter-scala dependency - Add ScalaExtractor with full AST extraction - Classes, objects, traits, methods - Package declarations - Imports - Extends/implements relationships - Extracts: Function, Class, Trait, Module, Import nodes - Edge types: Imports, Calls, Extends, Implements - Disabled Svelte (Windows C compiler fails)
Summary
Verification
cargo install --path crates/codegraph-mcp-server --bin codegraph --no-default-features --features daemon,embeddings-ollama,embeddings-openai,embeddings-jina,embeddings-lmstudio,server-http --force
codegraph index C:\Users\Administrator\codegraph-rust --index-tier fast --workers 2
Notes